package com.czl.module_storehouse.api;

import com.czl.base.data.bean.tengyun.BorrowBean;
import com.czl.base.data.bean.tengyun.CategoryBean;
import com.czl.base.data.bean.tengyun.LocatListBean;
import com.czl.base.data.bean.tengyun.ProductBean;
import com.czl.base.data.bean.tengyun.ReceiveBean;
import com.czl.base.data.bean.tengyun.RecordRemandBean;
import com.czl.base.data.bean.tengyun.SortBean;
import com.czl.base.data.bean.tengyun.StorehouseBean;
import com.czl.module_base.bean.CompanyBean;
import com.czl.module_base.bean.FileServiceResult;
import com.czl.module_base.bean.ListBean;
import com.czl.module_base.http.HttpResponse;
import com.czl.module_storehouse.bean.AllocateBean;
import com.czl.module_storehouse.bean.ApplicationBean;
import com.czl.module_storehouse.bean.CardBean;
import com.czl.module_storehouse.bean.CityBean;
import com.czl.module_storehouse.bean.DistrictBean;
import com.czl.module_storehouse.bean.InventoryBean;
import com.czl.module_storehouse.bean.InventoryInfoBean;
import com.czl.module_storehouse.bean.ProvinceBean;
import com.czl.module_storehouse.bean.PurchaseBean;
import com.czl.module_storehouse.bean.RoomListBean;
import com.czl.module_storehouse.bean.ShiftBean;
import com.czl.module_storehouse.bean.StorageRecordBean;
import com.czl.module_storehouse.bean.StorageTypeModel;
import com.czl.module_storehouse.bean.StoreHouseBean;
import com.czl.module_storehouse.bean.StoreProjectBean;
import com.czl.module_storehouse.bean.StorehouseSortInfoBean;
import com.czl.module_storehouse.bean.WorkGroupBean;
import com.czl.module_storehouse.bean.WorkerBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.QueryMap;

/**
 * @author by xubin,
 * @date on 2022/1/25.
 * PS: Not easy to write code, please indicate.
 */
public interface ApiService {
    /**
     * 上传照片
     *
     * @param params
     * @param body
     * @return
     */
    @Multipart
    @Headers("url_name:img")
    @POST("file/upload")
    Observable<HttpResponse<FileServiceResult>> uploadFile(@QueryMap Map<String, String> params, @Part MultipartBody.Part body);

    /**
     * 查询待领出领用单
     *
     * @param body
     * @return
     */
    @POST("facility/3_0/receiverApplicationInStoreHouse")
    Observable<HttpResponse<ListBean<ReceiveBean>>> getNeedDealtReceiveList(@Body RequestBody body);

    /**
     * 添加盘点记录
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addInventoryInfo")
    Observable<HttpResponse<InventoryInfoBean>> addInventoryInfo(@Body RequestBody body);

    /**
     * 通过公司id查询整个remapkey下的子公司
     *
     * @param body
     * @return
     */
    @POST("system/2_0/selectCompanyList")
    Observable<HttpResponse<List<CompanyBean>>> selectCompanyList(@Body RequestBody body);

    /**
     * 添加物品信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addSortInfo")
    Observable<HttpResponse<SortBean>> addSortInfo(@Body RequestBody body);

    /**
     * 修改物品信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/editSortInfo")
    Observable<HttpResponse<SortBean>> editSortInfo(@Body RequestBody body);

    /**
     * 查物品
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getSortList")
    Observable<HttpResponse<ListBean<SortBean>>> getSortList(@Body RequestBody body);

    /**
     * 删除物品信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/deleteSortInfo")
    Observable<HttpResponse<Object>> deleteSortInfo(@Body RequestBody body);

    /**
     * 设施分类接口
     *
     * @param body
     * @return
     */
    @POST("standard/3_0/facility/getclassificationlistCompany")
    Observable<HttpResponse<List<CategoryBean>>> getclassificationlistCompany2(@Body RequestBody body);

    /**
     * 仓库分类接口
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehousePropClass")
    Observable<HttpResponse<List<CategoryBean>>> getclassificationlistCompany(@Body RequestBody body);

    /**
     * 获取分类编码
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getSortCode")
    Observable<HttpResponse<SortBean>> getSortCode(@Body RequestBody body);

    /**
     * 仓库分类接口
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getClassStockList")
    Observable<HttpResponse<List<CategoryBean>>> getClassStockList(@Body RequestBody body);

    /**
     * 仓库库位
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseLocatList")
    Observable<HttpResponse<ListBean<LocatListBean>>> getStorehouseLocatList(@Body RequestBody body);

    /**
     * 查询供应商
     *
     * @param body
     * @return
     */
    @POST("system/2_0/selectCrmCompany")
    Observable<HttpResponse<ListBean<CompanyBean>>> selectCrmCompanyByTag(@Body RequestBody body);

    /**
     * 获取公司部门
     *
     * @param body
     * @return
     */
    @POST("system/2_0/selectOrganization")
    Observable<HttpResponse<ListBean<WorkGroupBean>>> selectOrganization(@Body RequestBody body);

    /**
     * 获取公司部门人员列表
     *
     * @param body
     * @return
     */
    @POST("system/2_0/selectUsersByCompanyId")
    Observable<HttpResponse<ListBean<WorkerBean>>> selectUsersByCompanyId(@Body RequestBody body);

    /**
     * 仓库入库查询采购单列表
     *
     * @param body
     * @return
     */
    @POST("purchase/2_0/card/appgetRukuPurhchaseCardList")
    Observable<HttpResponse<ListBean<PurchaseBean>>> appgetRukuPurhchaseCardList(@Body RequestBody body);

    /**
     * 按物品集合匹配物品
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/mateSortList")
    Observable<HttpResponse<ListBean<SortBean>>> mateSortList(@Body RequestBody body);

    /**
     * 添加公司
     *
     * @param body
     * @return
     */
    @POST("system/2_0/addCompany")
    Observable<HttpResponse<CompanyBean>> addCompany(@Body RequestBody body);

    /**
     * 新增管理客户
     *
     * @param body
     * @return
     */
    @POST("system/2_0/addCrmCompany")
    Observable<HttpResponse<CompanyBean>> addCrmCompany(@Body RequestBody body);

    /**
     * 删除客户关系
     *
     * @param body
     * @return
     */
    @POST("system/2_0/deleteCrmCompany")
    Observable<HttpResponse<CompanyBean>> deleteCrmCompany(@Body RequestBody body);

    /**
     * 修改客户关系
     *
     * @param body
     * @return
     */
    @POST("system/2_0/updateCrmCompany")
    Observable<HttpResponse<CompanyBean>> updateCrmCompany(@Body RequestBody body);

    /**
     * 修改公司信息
     *
     * @param body
     * @return
     */
    @POST("system/2_0/updateCompany")
    Observable<HttpResponse<CompanyBean>> updateCompany(@Body RequestBody body);

    /**
     * 查询已领出领用单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getDealtReceiveList")
    Observable<HttpResponse<ListBean<ReceiveBean>>> getDealtReceiveList(@Body RequestBody body);

    /**
     * 查询待归还领用单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getNeedReturnReceiveList")
    Observable<HttpResponse<ListBean<ReceiveBean>>> getNeedReturnReceiveList(@Body RequestBody body);

    /**
     * 查询已归还领用单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getReturnReceiveList")
    Observable<HttpResponse<ListBean<ReceiveBean>>> getReturnReceiveList(@Body RequestBody body);

    /**
     * 查询已归还领用单
     *
     * @param body
     * @return
     */
    @POST("facility/3_0/borrowApplicationInStoreHouse")
    Observable<HttpResponse<ListBean<BorrowBean>>> getNeedDealtBorrowList(@Body RequestBody body);

    /**
     * 查询已归还领用单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getDealtBorrowList")
    Observable<HttpResponse<ListBean<BorrowBean>>> getDealtBorrowList(@Body RequestBody body);

    /**
     * 查询已归还领用单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getNeedReturnBorrowList")
    Observable<HttpResponse<ListBean<BorrowBean>>> getNeedReturnBorrowList(@Body RequestBody body);

    /**
     * 查询已归还领用单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getReturnBorrowList")
    Observable<HttpResponse<ListBean<BorrowBean>>> getReturnBorrowList(@Body RequestBody body);

    /**
     * 查询待盘点单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getNeedDealtInvenList")
    Observable<HttpResponse<ListBean<InventoryBean>>> getNeedDealtInvenList(@Body RequestBody body);

    /**
     * 查询已盘点单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getDealtInvenList")
    Observable<HttpResponse<ListBean<InventoryBean>>> getDealtInvenList(@Body RequestBody body);

    /**
     * 查询已盘点单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getNeedInventorySortInfo")
    Observable<HttpResponse<ListBean<LocatListBean>>> getNeedInventorySortInfo(@Body RequestBody body);

    /**
     * 单品移位
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/inventoryProductShift")
    Observable<HttpResponse<Object>> inventoryProductShift(@Body RequestBody body);

    /**
     * 单品盘盈
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/inventoryProductStorage")
    Observable<HttpResponse<ListBean<ProductBean>>> inventoryProductStorage(@Body RequestBody body);

    /**
     * 查询盘点物品所在房间
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getInventoryRoomInfo")
    Observable<HttpResponse<ListBean<RoomListBean>>> getInventoryRoomInfo(@Body RequestBody body);

    /**
     * 查询盘点物品所在区域
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseLocatDetailedList")
    Observable<HttpResponse<ListBean<LocatListBean>>> getStorehouseLocatDetailedList(@Body RequestBody body);

    /**
     * 扫码提交盘点物品
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/productInventory")
    Observable<HttpResponse<Object>> productInventory(@Body RequestBody body);

    /**
     * 库存预警
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseStockWarnList")
    Observable<HttpResponse<ListBean<StorehouseBean.StockWarnBean>>> getStorehouseStockWarnList(@Body RequestBody body);

    /**
     * 库存情况
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseSortStockInfo")
    Observable<HttpResponse<SortBean>> getStorehouseSortStockInfo(@Body RequestBody body);

    /**
     * 查询物品
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseStockInfo")
    Observable<HttpResponse<ListBean<SortBean>>> getStorehouseStockInfo(@Body RequestBody body);

    /**
     * 查询仓库物品详情
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseSortInfo")
    Observable<HttpResponse<StorehouseSortInfoBean>> getStorehouseSortInfo(@Body RequestBody body);

    /**
     * 库存预览
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseLocatStockInfo")
    Observable<HttpResponse<ListBean<LocatListBean>>> getStorehouseLocatStockInfo(@Body RequestBody body);

    /**
     * 查询调拨单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getNeedDealtMoveList")
    Observable<HttpResponse<ListBean<AllocateBean>>> getNeedDealtMoveList(@Body RequestBody body);

    /**
     * 查询已调拨单
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getDealtMoveList")
    Observable<HttpResponse<ListBean<AllocateBean>>> getDealtMoveList(@Body RequestBody body);

    /**
     * 添加移库单信息（出库）
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addMoveInfo")
    Observable<HttpResponse<Object>> addMoveInfo(@Body RequestBody body);

    /**
     * 修改移出信息（入库）
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/editMoveInfo")
    Observable<HttpResponse<Object>> editMoveInfo(@Body RequestBody body);

    /**
     * 调拨入库
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/moveStorage")
    Observable<HttpResponse<Object>> moveStorage(@Body RequestBody body);
//    /**
//     * 查询仓库
//     * @param body
//     * @return
//     */
//    @POST("storehouse/2_0/getManageCompanystorehouseList")
//    Observable<HttpResponse<ListBean<StoreHouseBean>>> getManageCompanystorehouseList(@Body RequestBody body);

    /**
     * 查询省份
     *
     * @param body
     * @return
     */
    @POST("system/2_0/selectProvince")
    Observable<HttpResponse<ListBean<ProvinceBean>>> selectProvince(@Body RequestBody body);

    /**
     * 查询城市
     *
     * @param body
     * @return
     */
    @POST("system/2_0/selectCity")
    Observable<HttpResponse<ListBean<CityBean>>> selectCity(@Body RequestBody body);

    /**
     * 查询县区
     *
     * @param body
     * @return
     */
    @POST("system/2_0/selectDistrict")
    Observable<HttpResponse<ListBean<DistrictBean>>> selectDistrict(@Body RequestBody body);

    /**
     * 查询公司详情
     *
     * @param body
     * @return
     */
    @POST("system/2_0/selectByCompanyId")
    Observable<HttpResponse<CompanyBean>> selectByCompanyId(@Body RequestBody body);

    /**
     * 查询调入物品
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getNeedDealtMoveNewSortInfo")
    Observable<HttpResponse<AllocateBean>> getNeedDealtMoveNewSortInfo(@Body RequestBody body);

    /**
     * 查询仓库领用物品
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getReceiveSortByUserId")
    Observable<HttpResponse<ListBean<SortBean>>> getReceiveSortByUserId(@Body RequestBody body);

    /**
     * 领用申请
     *
     * @param body
     * @return
     */
    @POST("facility/3_0/addUseApplication")
    Observable<HttpResponse<String>> addUseApplication(@Body RequestBody body);

    /**
     * 查询待领出领用单
     *
     * @param body
     * @return
     */
    @POST("facility/3_0/receiverApplicationInStoreHouse")
    Observable<HttpResponse<ListBean<ReceiveBean>>> receiverApplicationInStoreHouse(@Body RequestBody body);

    /**
     * 查询领用单
     *
     * @param body
     * @return
     */
    @POST("facility/3_0/WXGetApplicationInfo")
    Observable<HttpResponse<ApplicationBean>> WXGetApplicationInfo(@Body RequestBody body);

    /**
     * 直接领用出库操作
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addReceiveInfo")
    Observable<HttpResponse<Object>> addReceiveList(@Body RequestBody body);

    /**
     * 添加分类领用归还记录信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addReceiveSortReturnInfo")
    Observable<HttpResponse<Object>> addReceiveSortReturnInfo(@Body RequestBody body);

    /**
     * 添加单品领用归还记录信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addReceiveProductReturnInfo")
    Observable<HttpResponse<Object>> addReceiveProductReturnInfo(@Body RequestBody body);

    /**
     * 根据分类id 查询待处理领用单信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getNeedDealtReceiveListBySortId")
    Observable<HttpResponse<ListBean<ReceiveBean>>> getNeedDealtReceiveListBySortId(@Body RequestBody body);

    /**
     * 直接借用出库操作
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addBorrowInfo")
    Observable<HttpResponse<Object>> addBorrowInfo(@Body RequestBody body);

    /**
     * 申请借用出库操作
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/editBorrowInfo")
    Observable<HttpResponse<Object>> editBorrowInfo(@Body RequestBody body);

    /**
     * 直接领用出库操作
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addReceiveInfo")
    Observable<HttpResponse<Object>> addReceiveInfo(@Body RequestBody body);

    /**
     * 申请领用出库操作
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/editReceiveInfo")
    Observable<HttpResponse<Object>> editReceiveInfo(@Body RequestBody body);

    /**
     * 领用物品归还（分类、单品）
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/receiveReturn")
    Observable<HttpResponse<Object>> receiveReturn(@Body RequestBody body);

    /**
     * 单品(借用、领用)归还
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/productReturn")
    Observable<HttpResponse<Object>> productReturn(@Body RequestBody body);

    /**
     * 借用物品归还（分类、单品）
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/borrowReturn")
    Observable<HttpResponse<Object>> borrowReturn(@Body RequestBody body);

    /**
     * 直接归还
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/directReturn")
    Observable<HttpResponse<Object>> directReturn(@Body RequestBody body);

    /**
     * 查询分类物品在用信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getSortUseInfo")
    Observable<HttpResponse<ListBean<RecordRemandBean>>> getSortUseInfo(@Body RequestBody body);

    /**
     * 查询扫码物品在用信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getProUseInfo")
    Observable<HttpResponse<ListBean<RecordRemandBean>>> getProUseInfo(@Body RequestBody body);

    /**
     * 损坏记录
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getDamageSortList")
    Observable<HttpResponse<ListBean<RecordRemandBean>>> getDamageSortList(@Body RequestBody body);

    /**
     * 提交盘点信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/editInventoryInfo")
    Observable<HttpResponse<InventoryBean>> editInventoryInfo(@Body RequestBody body);

    /**
     * 根据物品code获取物品信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getProductInfoByCode")
    Observable<HttpResponse<ProductBean>> getProductInfoByCode(@Body RequestBody body);

    /**
     * 单品信息查询
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getProductInfo")
    Observable<HttpResponse<ProductBean>> getProductInfo2(@Body RequestBody body);

    /**
     * 单品信息查询
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getProductUseInfo")
    Observable<HttpResponse<ProductBean>> getProductUseInfo(@Body RequestBody body);

    /**
     * 新建移位单信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addShiftInfo")
    Observable<HttpResponse<ShiftBean>> addShiftInfo(@Body RequestBody body);

    /**
     * 仓库分类品的库存信息
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseSortStockList")
    Observable<HttpResponse<ListBean<LocatListBean>>> getStorehouseSortStockList(@Body RequestBody body);

    /**
     * 获取入库类型
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorageModel")
    Observable<HttpResponse<List<StorageTypeModel>>> getStorageModel(@Body RequestBody body);

    /**
     * 采购单列表查询
     *
     * @param body
     * @return
     */
    @POST("purchase/2_0/card/getStorehouseCardList")
    Observable<HttpResponse<List<CardBean>>> getStorehouseCardList(@Body RequestBody body);

    /**
     * 新品入库
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/addStorage")
    Observable<HttpResponse<Object>> addStorage(@Body RequestBody body);

    /**
     * 仓库入库列表
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorageList")
    Observable<HttpResponse<ListBean<StorageRecordBean>>> getStorageList(@Body RequestBody body);

    /**
     * 查询仓库
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getManageCompanystorehouseList")
    Observable<HttpResponse<ListBean<StoreHouseBean>>> getManageCompanystorehouseList(@Body RequestBody body);

    /**
     * 查询仓库
     *
     * @param body
     * @return
     */
    @POST("storehouse/2_0/getStorehouseByUserId")
    Observable<HttpResponse<ListBean<StoreHouseBean>>> getStorehouseByUserId(@Body RequestBody body);
}
